package com.gjs.cd.service.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gjs.cd.mapper.CdCodeActivationRecordMapper;
import com.gjs.cd.pojo.dto.TotalReq;
import com.gjs.cd.pojo.entity.CdCodeActivationRecord;
import com.gjs.cd.service.ICdCodeActivationRecord;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author zhongwenguang
 * @date 2022-3-21 15:38
 */
@Service
public class CdCodeActivationRecordImpl extends ServiceImpl<CdCodeActivationRecordMapper, CdCodeActivationRecord> implements ICdCodeActivationRecord {

    @Autowired
    private CdCodeActivationRecordMapper cdCodeActivationRecordMapper;

    @Override
    public List<TotalReq> getTotalByIds(String tableName, List<Long> batchIds) {
        return cdCodeActivationRecordMapper.getTotalByIds(tableName,batchIds);
    }

    @Override
    public List<CdCodeActivationRecord> codeCheckRecord(String tableName, Long id) {
        return cdCodeActivationRecordMapper.codeCheckRecord(tableName,id);
    }

    @Override
    public Integer addRecord(String tableName, CdCodeActivationRecord cdCodeActivationRecord) {
        return cdCodeActivationRecordMapper.addRecord(tableName,cdCodeActivationRecord);
    }

    @Override
    public CdCodeActivationRecord checkRecord(String tableName, CdCodeActivationRecord record) {
        return cdCodeActivationRecordMapper.checkRecord(tableName,record);
    }

    @Override
    public List<String> queryTable() {
        return cdCodeActivationRecordMapper.queryTable();
    }

    @Override
    public List<CdCodeActivationRecord> queryByTableNames(List<String> list, CdCodeActivationRecord record) {
        return cdCodeActivationRecordMapper.queryByTableNames(list,record);
    }

    @Override
    public List<CdCodeActivationRecord> queryAllRecord(String tableName, String userSn, String deviceMac) {
        return cdCodeActivationRecordMapper.queryAllRecord(tableName,userSn,deviceMac);
    }

    @Override
    public List<Long> queryUserRecord(String tableName, String userSn) {
        return cdCodeActivationRecordMapper.queryUserRecord(tableName,userSn);
    }
}
